import { createApp } from 'vue'
import App from './App.vue'
import pinia from '../stores/index'
import axios from 'axios'

const app = createApp(App);
app.use(pinia);
app.mount("#app");

axios.get("https://dazi.91xjr.com/").then((res) => {
    console.log(res);
})

axios.post("https://dazi.91xjr.com/", { name: "cq", passwd: 123456 }).then((res) => { console.log("post获取成功", res.data) }).catch(() => {
    console.log("post获取失败")
})

axios.interceptors.request.use((config) => {
    console.log("发送成功拦截");
     return config;
})

axios.interceptors.request.use((config) => {
    console.log("发送失败拦截");
    return config;
})

axios.interceptors.response.use((config) => {
    console.log("发送失败拦截");
     return config;
})

axios.interceptors.response.use((config) => {
    console.log("发送失败拦截");
     return config;
})

//创建实例
const instance = axios.create(
    {
        baseURL:"",
        method: "",
        timeout: 1000,
        params:
        {
            
        }
    }
)